package com.example.spirngbootyaml.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author 墨苍璃
 * @date 2022年01月12日17时13分
 * 测试  properties 配置文件
 */
@Component
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@PropertySource(value = "classpath:person.properties")
public class Person1 {
    @Value("${name}")
    private String name;
    private Integer age;
    private Boolean happy;
    private Date birth;
    private Map<String, Object> maps;
    private List<Object> lists;
    private Dog dog;
}